﻿#ifndef JZWEB_CONTEXT_H_
#define JZWEB_CONTEXT_H_

#include <QVariant>
#include <QSharedPointer>

class JZWebCommand
{
public:

};

class JZWebContext
{
public:
	JZWebContext();
	virtual ~JZWebContext();

	void setProperty(int key, const QVariant &v);
	QVariant property(int key);

	void addCommand(const JZWebCommand &cmd);
	const QVector<JZWebCommand> &commands() const;

protected:
	QMap<int, QVariant> m_props;
	QVector<JZWebCommand> m_command;
};
typedef QSharedPointer<JZWebContext> JZWebContextPtr;

int makeKey(int id, int prop);
void splitKey(int key,int &id,int &prop);

#endif // !JZWEB_PAGE_H_
